package com.tbit.uqbike.object.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author yee_
 * @version 1.0
 * @date 2023/2/10 15:49
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class UserRidingScoreConfig {

    /**
     * 品牌名称
     */
    @TableId(type = IdType.INPUT)
    @NotNull(message = "请选择品牌")
    private Integer accountId;
    /**
     * 规范停车得分
     */
    @NotNull(message = "请填写规范停车得分")
    @Max(value = 600, message = "站外还车得分不能超过600")
    @Min(value = 0, message = "规范停车得分不能小于0")
    private Integer standardParking;

    /**
     * 站外还车扣分
     */
    @NotNull(message = "请填写站外还车扣分")
    @Max(value = 0, message = "站外还车扣分不能为正数")
    @Min(value = -600, message = "站外还车扣分不能超过600")
    private Integer overflowReturn;
    /**
     * 禁行区还车扣分
     */
    @NotNull(message = "请填写禁行区还车扣分")
    @Max(value = 0, message = "站外还车扣分不能为正数")
    @Min(value = -600, message = "站外还车扣分不能超过600")
    private Integer prohibitAreaReturn;
    /**
     * 区域外还车扣分
     */
    @NotNull(message = "请填写区域外还车扣分")
    @Max(value = 0, message = "域外还车扣分不能为正数")
    @Min(value = -600, message = "域外还车扣分不能超过600")
    private Integer overflowAreaReturn;

    public UserRidingScoreConfig(Integer accountId) {
        this.accountId = accountId;
        this.standardParking = 0;
        this.overflowReturn = 0;
        this.prohibitAreaReturn = 0;
        this.overflowAreaReturn = 0;
    }
}
